package com.caiyouxi.common.bean;

import com.fasterxml.jackson.annotation.JsonIgnore;

import java.util.List;

/**
 * User: wcy
 * Date: 2015/3/30 0030
 * Time: 下午 14:08
 */
public class QueryParams {

    @JsonIgnore
    private int total;
    @JsonIgnore
    private int page_size;//每页多少个
    @JsonIgnore
    private int page;//第几页
    @JsonIgnore
    private int start;

    @JsonIgnore
    private String orderBy;// 排序字段名
    @JsonIgnore
    private String order;// 按什么排序(asc,desc)

    private List list;

    

    public List getList() {
        return list;
    }

    public void setList(List list) {
        this.list = list;
    }
    
    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getPage_size() {

        return page_size;
    }

    public void setPage_size(int page_size) {
        this.page_size = page_size;
    }

    public int getPage() {
        return page==0?1:page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public String getOrderBy() {
        return orderBy==null?"create_time desc":orderBy;
    }

    public void setOrderBy(String orderBy) {
        this.orderBy = orderBy;
    }

    public String getOrder() {
        return order;
    }

    public void setOrder(String order) {
        this.order = order;
    }

    public int getStart()
    {
        return getPage()==1?0:(getPage()-1)*getPage_size();
    }

	public void setStart(Integer start)
	{
		this.start = start;
	}
    
    
}
